package com.example.eurekaconsumer.service;

import com.example.eurekaconsumer.FallBack.FeignTestServiceFallback;
import com.example.eurekaconsumer.FallBack.FeignTestServiceFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * @title: FeignTestService
 * @projectName demo
 * @Date: 2021/5/22 22:07
 * @Author: lei.yu-esint
 * @Description:
 */
@FeignClient(value = "EUREKA-PRODUCER",
        fallback = FeignTestServiceFallback.class,//无法捕捉薇服务的错误信息
        fallbackFactory = FeignTestServiceFallbackFactory.class//可以捕捉薇服务的错误信息
)
public interface FeignTestService {

    @RequestMapping("/Index/hello")
    public String hello();

    @RequestMapping("/Index/index")
    public List Index();

}
